﻿using System.Diagnostics.Contracts;

namespace Library
{
    public interface IHasValueReadOnly
    {
        [Pure]
        object Value { get; }
    }

    public interface IHasValueWriteOnly
    {
        object Value { set; }
    }

    public interface IHasValue : IHasValueReadOnly, IHasValueWriteOnly
    {
        new object Value
        {
            [Pure]
            get;
            set;
        }
    }

    public interface IHasValueReadOnly<out T>
    {
        [Pure]
        T Value { get; }
    }

    public interface IHasValueWriteOnly<in T>
    {
        T Value { set; }
    }

    public interface IHasValue<T> : IHasValueReadOnly<T>, IHasValueWriteOnly<T>
    {
        new T Value
        {
            [Pure]
            get;
            set;
        }
    }
}
